package com.hivekion.common.entity.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnComment;
import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnType;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.hivekion.system.domain.SysArea;
import com.hivekion.system.domain.SysRole;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("当前登录用户信息")
public class UserInfoVo implements Serializable {
      private String id;
      private String nickName;
      private String userName;
      private String avatar;
      private String status;
      //    private String telephone;
      private List<SysArea> areaIds;
      private List<SysRole> roles;
      private List<String> permissions; // 权限列表
      @TableField
      @ColumnType(value = MySqlTypeConstant.DATETIME)
      @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
      @ColumnComment("上次修改密码时间")
      private Date lastUpdate;
}
